package com.ssy.lingxi.platform.manage.service.content;

import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.response.PageData;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.api.model.dto.material.MaterialFileInfoDTO;
import com.ssy.lingxi.platform.manage.api.model.vo.material.MaterialFileFeignVO;
import com.ssy.lingxi.platform.manage.entity.content.MaterialLibrary;
import com.ssy.lingxi.platform.manage.model.request.content.MaterialLibraryAddRequest;
import com.ssy.lingxi.platform.manage.model.request.content.MaterialLibraryBatchDelRequest;
import com.ssy.lingxi.platform.manage.model.request.content.MaterialLibraryDelRequest;
import com.ssy.lingxi.platform.manage.model.request.content.MaterialLibraryPageRequest;

import java.util.List;

/**
 * 素材库管理 - 业务处理层
 * @author xiechenhui
 * @version 2.0.0
 * @date 2022/03/24
 */
public interface IMaterialLibraryService {

    /**
     * 素材管理分页查询
     * @param request   参数
     * @param user      登录信息
     * @return
     */
    Wrapper<PageData<MaterialLibrary>> page(MaterialLibraryPageRequest request, UserLoginCacheDTO user);

    /**
     * 新增素材
     * @param request   参数
     * @param sysUser   登录信息
     * @return
     */
    Wrapper<Void> add(MaterialLibraryAddRequest request, UserLoginCacheDTO sysUser);

    /**
     * 删除素材
     * @param request   参数
     * @param sysUser   登录信息
     * @return
     */
    Wrapper<Void> del(MaterialLibraryDelRequest request, UserLoginCacheDTO sysUser);

    /**
     * 批量删除素材
     * @param request   参数
     * @param sysUser   登录信息
     * @return
     */
    Wrapper<Void> batchDel(MaterialLibraryBatchDelRequest request, UserLoginCacheDTO sysUser);

    /**
     * 根据会员id和角色id查询素材库细腻
     * @param request
     * @return
     */
    Wrapper<List<MaterialFileFeignVO>> findAllByMemberIdAndRoleId(MaterialFileInfoDTO request);
}
